<? $section='Customers'; ?>
<?
	require_once 'inc/functions.php';
	$conn = getConnection();
	//print_r($conn);
		$result = $conn->query('SELECT * FROM Proj_Customer');
		
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
</head>

<body bgcolor="#333333">
<h1><img src="logo.png" alt="Logo" width="619" height="117" /></h1>
<? include("inc/tabs.php"); ?>
<div class="content">
<h2>Customer Table</h2>
<table border ="1">
	<tr>
		<th>Customer ID</th>
		<th>Created At</th>
        <th>Updated At</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Password</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Customer_id']?></td>
     <td><?=$rs['created_at']?></td>
     <td><?=$rs['updated_at']?></td>
     <td><?=$rs['FirstName']?></td>
     <td><?=$rs['LastName']?></td>
     <? if($rs['Password']==NULL) { ?>
	  <td><?= 'NULL' ?></td>
	 <? }else{ ?>
     <td><?=$rs['Password']?></td>
     <? } ?>
     </tr>
<? } ?>
</table>
<? $result = $conn->query('SELECT * FROM Proj_CustomerAddress'); ?>
<h2>Customer Address</h2>

<table border ="1">
	<tr>
		<th>Customer ID</th>
		<th>Address ID</th>
        <th>Created At</th>
        <th>Updated At</th>
        <th>Address Type</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Customer_id']?></td>
     <td><?=$rs['Address_id']?></td>
     <td><?=$rs['created_at']?></td>
     <td><?=$rs['updated_at']?></td>
     <td><?=$rs['AddressType']?></td>
     </tr>
<? } ?>
</table>
<? $result = $conn->query('SELECT * FROM Proj_Address'); ?>
<h2>Address</h2>

<table border ="1">
	<tr>
		<th>Address ID</th>
		<th>Address Line 1</th>
        <th>Address Line 2</th>
        <th>City</th>
        <th>State</th>
        <th>Zip Code</th>
        <th>Country</th>
        <th>Created At</th>
        <th>Updated At</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Address_id']?></td>
     <td><?=$rs['AddressLine1']?></td>
     <td><?=$rs['AddressLine2']?></td>
     <td><?=$rs['City']?></td>
     <td><?=$rs['State']?></td>
     <td><?=$rs['ZipCode']?></td>
     <td><?=$rs['Country']?></td>
     <td><?=$rs['created_at']?></td>
     <td><?=$rs['updated_at']?></td>
     </tr>
<? } ?>
</table>
<? $result = $conn->query('SELECT * FROM Proj_ContactMethods'); ?>
<h2>Contact Methods</h2>

<table border ="1">
	<tr>
		<th>Customer ID</th>
		<th>Home Phone</th>
        <th>Work Phone</th>
        <th>Email</th>
        <th>Updated At</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Customer_id']?></td>
     <td><?=$rs['HomePhone']?></td>
     <td><?=$rs['WorkPhone']?></td>
     <td><?=$rs['Email']?></td>
     <td><?=$rs['updated_at']?></td>
     </tr>
<? } ?>
</table>
</div>
</body>
</html>

<? $conn->close(); ?>=======
<? $section='Customers'; ?>
<?
	require_once 'inc/functions.php';
	$conn = getConnection();
	//print_r($conn);
		$result = $conn->query('SELECT * FROM Proj_Customer');
		
?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
</head>

<body>
<? include("inc/tabs.php"); ?>
<h2>Customer Table</h2>

<table border ="1">
	<tr>
		<th>Customer ID</th>
		<th>Created At</th>
        <th>Updated At</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Password</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Customer_id']?></td>
     <td><?=$rs['created_at']?></td>
     <td><?=$rs['updated_at']?></td>
     <td><?=$rs['FirstName']?></td>
     <td><?=$rs['LastName']?></td>
     <? if($rs['Password']==NULL) { ?>
	  <td><?= 'NULL' ?></td>
	 <? }else{ ?>
     <td><?=$rs['Password']?></td>
     <? } ?>
     </tr>
<? } ?>
</table>
<? $result = $conn->query('SELECT * FROM Proj_CustomerAddress'); ?>
<h2>Customer Address</h2>

<table border ="1">
	<tr>
		<th>Customer ID</th>
		<th>Address ID</th>
        <th>Created At</th>
        <th>Updated At</th>
        <th>Address Type</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Customer_id']?></td>
     <td><?=$rs['Address_id']?></td>
     <td><?=$rs['created_at']?></td>
     <td><?=$rs['updated_at']?></td>
     <td><?=$rs['AddressType']?></td>
     </tr>
<? } ?>
</table>
<? $result = $conn->query('SELECT * FROM Proj_Address'); ?>
<h2>Address</h2>

<table border ="1">
	<tr>
		<th>Address ID</th>
		<th>Address Line 1</th>
        <th>Address Line 2</th>
        <th>City</th>
        <th>State</th>
        <th>Zip Code</th>
        <th>Country</th>
        <th>Created At</th>
        <th>Updated At</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Address_id']?></td>
     <td><?=$rs['AddressLine1']?></td>
     <td><?=$rs['AddressLine2']?></td>
     <td><?=$rs['City']?></td>
     <td><?=$rs['State']?></td>
     <td><?=$rs['ZipCode']?></td>
     <td><?=$rs['Country']?></td>
     <td><?=$rs['created_at']?></td>
     <td><?=$rs['updated_at']?></td>
     </tr>
<? } ?>
</table>
<? $result = $conn->query('SELECT * FROM Proj_ContactMethods'); ?>
<h2>Contact Methods</h2>

<table border ="1">
	<tr>
		<th>Customer ID</th>
		<th>Home Phone</th>
        <th>Work Phone</th>
        <th>Email</th>
        <th>Updated At</th>
	</tr>
    
<? while($rs = $result->fetch_assoc()) { ?>
     <tr>
     <td><?=$rs['Customer_id']?></td>
     <td><?=$rs['HomePhone']?></td>
     <td><?=$rs['WorkPhone']?></td>
     <td><?=$rs['Email']?></td>
     <td><?=$rs['updated_at']?></td>
     </tr>
<? } ?>
</table>
</body>
</html>

<? $conn->close(); ?>>>>>>>> .r21
